ViewPathProvider

fun interface ViewPathProvider

An interface through which to set the clip Path for irregularly shaped Views on API levels 30 and above.

Views that are not plain rectangles, regular round rectangles, or circles have their shapes defined by a Path field that became inaccessible starting with Android R.

For those cases where the shape cannot be determined automatically, this interface and its corresponding extension property – pathProvider – provide a fallback mechanism through which it can be set manually.

Functions

Link copied to clipboard
abstract fun getPath(view: View, path: Path)

Called whenever the target View's shape cannot be determined internally.